import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

import java.util.Scanner;
class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int col = in.nextInt();
        int row = in.nextInt();
        int count = 0;
        int[][] array = new int[row][col];
        for(int i = 0;i < row;i++) {
            for(int j = 0;j < col;j++) {
                if(array[i][j] == 0) {
                    count++;
                    if(i+2 < row) {
                        array[i+2][j] = 1;
                    }
                    if(j+2 < col) {
                        array[i][j+2] = 1;
                    }
                }
            }
        }
        System.out.println(count);
    }
}

class Main1 {
    public static int getMax(int a, int b){
        return a > b ? a : b;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int size = in.nextInt();
        int[] array = new int[size];
        for (int i = 0; i < size; i++){
            array[i] = in.nextInt();
        }
        int sum = array[0];
        int max = array[0];
        for (int i = 0; i < size; i++){
            sum = getMax(sum + array[i], array[i]);
            if (sum >= max){
                max = sum;
            }
        }
        System.out.println(max);
    }
}
 class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str1 = sc.nextLine();
        String str2 = sc.nextLine();
        int len = str1.length();
        int n = 0;
        for (int i = 0; i <= len; i++) {
// 将字符串2插入到字符串1的每个位置，再判断是否是回文
            StringBuffer str = new StringBuffer(str1);
            str.insert(i, str2);
//注意这里，不能直接StringBuilder str5 = str.reverse();
//因为这样str本身又变了。
            StringBuilder tmp = new StringBuilder(str);
            StringBuilder str5 = tmp.reverse();
            if (str.toString().equals(str5.toString())) {
                n++;
            }
        }
        System.out.println(n);

    }
 }



public class ZuoYe0914 {
    public static void main(String[] args) {

    }

}
